<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-once指令</title>
</head>
<body>
<div id="app">
    <h1>{{title}}</h1>
    修改：<input type="text" v-model="title"/>
    <h1 v-once>只渲染一次：{{title}}</h1>
</div>

<!-- 生产环境版本，优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript">
    var vue = new Vue({
        el: "#app",
        data: {
            title: "跟着改变"
        }
    })
</script>
</body>
</html>
